State
Queries state information for the router.
query State {
router {
state {
id
admin
constant_product_vlp_code_id
stable_vlp_code_id
virtual_balance_address
locked
}
}
}
Example
curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query State {\n router {\n state {\n id\n admin\n constant_product_vlp_code_id\n stable_vlp_code_id\n virtual_balance_address\n locked\n }\n }\n}"}'
Example Response
{
"data": {
"router": {
"state": {
"id": "ContractStateOfRouter:singleton",
"admin": "euclid1z328t58xya5hw32a869n6hah33uaehw5zz9rj3",
"constant_product_vlp_code_id": 8,
"stable_vlp_code_id": 9,
"virtual_balance_address": "euclid1zwv6feuzhy6a9wekh96cd57lsarmqlwxdypdsplw6zhfncqw6ftqw54q5a",
"locked": false
}
}
}
}
Return Fields
| Field | Type | Description |
|---|---|---|
id | String | The singleton identifier for the router state object. |
admin | String | The admin address of the router. |
constant_product_vlp_code_id | Int | The code ID used for constant product VLP deployments. |
stable_vlp_code_id | Int | The code ID used for stable VLP deployments. |
virtual_balance_address | String | The address of the VBalance contract. |
locked | Boolean | Whether the router is currently locked. |